<template>
  <div>
    <j-upload
      v-model="uploadPath"
      :trigger-change="true"
      :isMultiple="false"
      @change="uploadInfo"
    ></j-upload>
  </div>

</template>

<script>
  import wx from 'weixin-js-sdk'
  import JUpload from '@/components/jeecg/JUpload'
  export default {
    name: 'uploadModal',
    components: {
      JUpload,
    },
    data() {
      return {
        uploadPath:'',
      }
    },
    methods: {
      uploadInfo(e){
        console.log(e);
        wx.miniProgram.getEnv(function(res) {
          console.log(res.miniprogram) // true
        })
        wx.miniProgram.postMessage({data:this.uploadPath})
        wx.miniProgram.navigateBack({
          delta:1,
        });
      },
    },
  }
</script>

<style>
  body{
    height: 33px;
    width: 112px;
  }
</style>
